# schemas/medical_history.py
from pydantic import BaseModel
from datetime import datetime
from typing import Optional

class MedicalHistoryCreate(BaseModel):
    title: str
    content: str

class MedicalHistoryOut(BaseModel):
    id: int
    user_id: int
    title: str
    content: str
    createdAt: datetime
    updatedAt: datetime

    # Pydantic v2 正确配置
    model_config = {"from_attributes": True}








